<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Off the Record</title>
<link rel="stylesheet"
	href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">

</head>
<body>
	<c:import url="../common/top.jsp" />
	<div class="container" style="margin: 60px;"></div>

	<div class="container">
		<div class="row">

			<div class="col-xs-1 col-sm-1 col-md-1 col-lg-1"></div>

			<!--  -->
			<div class="col-xs-10 col-sm-10 col-md-10 col-lg-10">

				<div class="col-xs-12 col-sm-4 col-md-3 col-lg-3">
					<c:import url="../common/user_menu.jsp" />
				</div>


				<!--  -->
				<div class="col-xs-9 col-sm-9 col-md-9 col-lg-9">
					<div class="user_interest user_interest-tabs">
						<ul id="myTab" class="nav nav-tabs">
							<c:if test="${flag == 'review'}">
								<li class="active"><a href="#review" data-toggle="tab">관심
										리뷰</a></li>
								<li><a href="#company" data-toggle="tab">관심 기업</a></li>
							</c:if>
							<c:if test="${flag == 'company'}">
								<li><a href="#review" data-toggle="tab">관심 리뷰</a></li>
								<li class="active"><a href="#company" data-toggle="tab">관심
										기업</a></li>
							</c:if>
							<c:if test="${fn:length(flag) == 0}">
								<li class="active"><a href="#review" data-toggle="tab">관심
										리뷰</a></li>
								<li><a href="#company" data-toggle="tab">관심 기업</a></li>
							</c:if>
						</ul>

						<div id="myTabContent" class="tab-content">
							<c:if test="${flag == 'review'}">
								<div class="tab-pane fade in active" id="review">
							</c:if>
							<c:if test="${flag == 'company'}">
								<div class="tab-pane fade " id="review">
							</c:if>
							<c:if test="${fn:length(flag) == 0}">
								<div class="tab-pane fade in active" id="review">
							</c:if>
							<div class="user_interest_reivew">
								<div class="table-responsive">

									<c:if test="${fn:length(crv) != 0}">
										<div class="my-review col-xs-12 col-sm-12 col-md-12 col-lg-12" style="padding: 10px;">
											<!-- user -->
											<c:forEach items="${crv }" var="crv">
												<div class="user col-xs-3 col-sm-3 col-md-3 col-xs-3" style="border: 1px solid lightgray; padding: 10px;">
													<div class="col-xs-12">
														<div class="" style="padding: 10px;">
															작성자 : ${crv.key }
														</div>
														
														기업 : ${crv.value[0].companyReviewVerifyVO.companyReviewVO.companyVo.companyName}
														
														<div class="company-score col-xs-12 col-sm-12 col-md-12 col-lg-12" style="padding: 10px;">
															<div class="company-score-bar col-6-xs col-6-sm col-6-md col-6-lg">
																<div class="progress">
																	<div class="progress-bar progress-bar-success"
																		role="progressbar" aria-valuenow="100"
																		aria-valuemin="0" aria-valuemax="100"
																		style="width: ${crv.value[0].companyReviewVerifyVO.companyReviewVO.scoreVo.scoreChance*20}%;">
																		<span class="company-score-bar" style="font: black;">승진
																			및 기회</span>
																	</div>
																</div>

																<div class="progress">
																	<div class="progress-bar progress-bar-info"
																		role="progressbar" aria-valuenow="100"
																		aria-valuemin="0" aria-valuemax="100"
																		style="width: ${crv.value[0].companyReviewVerifyVO.companyReviewVO.scoreVo.scoreWelfare*20}%;">
																		<span class="company-score-bar">복지 및 급여</span>
																	</div>
																</div>

																<div class="progress">
																	<div class="progress-bar progress-bar-info"
																		role="progressbar" aria-valuenow="100"
																		aria-valuemin="0" aria-valuemax="100"
																		style="width: ${crv.value[0].companyReviewVerifyVO.companyReviewVO.scoreVo.scoreCulture*20}%;">
																		<span class="company-score-bar">사내 문화</span>
																	</div>
																</div>

																<div class="progress">
																	<div class="progress-bar progress-bar-info"
																		role="progressbar" aria-valuenow="100"
																		aria-valuemin="0" aria-valuemax="100"
																		style="width: ${crv.value[0].companyReviewVerifyVO.companyReviewVO.scoreVo.scoreHoliday*20}%;">
																		<span class="company-score-bar">휴가 자율성</span>
																	</div>
																</div>

																<div class="progress">
																	<div class="progress-bar progress-bar-danger"
																		role="progressbar" aria-valuenow="100"
																		aria-valuemin="0" aria-valuemax="100"
																		style="width: ${crv.value[0].companyReviewVerifyVO.companyReviewVO.scoreVo.scoreOverdue*20}%">
																		<span class="company-score-bar">초과근무</span>
																	</div>
																</div>

																<div class="progress">
																	<div class="progress-bar progress-bar-warning"
																		role="progressbar" aria-valuenow="100"
																		aria-valuemin="0" aria-valuemax="100"
																		style="width: ${crv.value[0].companyReviewVerifyVO.companyReviewVO.scoreVo.scoreExecutive*20}%">
																		<span class="company-score-bar">경영진</span>
																	</div>
																</div>
															</div>
														</div>
													</div>
												</div>

												<!-- 내가 쓴 리뷰 -->
												
												<!-- review -->
												<div class="review col-xs-9 col-sm-9 col-md-9 col-xs-9" style="padding: 10px;">
													<!-- 작성일자 -->
													<div class="review-btn col-sm-12 col-md-12 col-lg-12" style="padding: 10px;">
														<strong>${crv.value[0].companyReviewVerifyVO.companyReviewVO.companyReviewWriteDate}</strong>
													</div>
													<!-- 작성일자 -->
												
													<!-- 리뷰 -->
													<div class="review col-xs-12 col-sm-12 col-md-12 col-lg-12" style="border: 1p solid lightgray; padding: 10px;">
														<div class="review-review col-xs-12 col-sm-12 col-md-12 col-lg-12">
															<pre><p class="text-success"><strong>리뷰 : </strong></p>${crv.value[0].companyReviewVerifyVO.companyReviewContents}</pre>
														</div>
														
														<div class="review-p-c col-xs-12 col-sm-12 col-md-12 col-lg-12" style="padding-bottom: 10px;">
														<button class="btn btn-primary btn-xs disabled"
															onclick="#">진실</button>
														<span class="badge">${crv.value[0].t}</span> /
														<button class="btn btn-danger btn-xs disabled" onclick="#">거짓</button>
														<span class="badge">${crv.value[0].o}</span>

													</div>
														
													</div><!-- End 리뷰 -->
													
													<!-- 장점 -->
													<div class="review-p col-xs-12 col-sm-12 col-md-12 col-lg-12" style="padding: 10px;">
														<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
															<pre><p class="text-primary"><strong>장점 : </strong></p>${crv.value[1].companyReviewVerifyVO.companyReviewContents}</pre>
														</div>
														
														<div class="review-p-p-c col-xs-12 col-sm-12 col-md-12 col-lg-12" style="padding-bottom: 10px;">
															<button class="btn btn-primary btn-xs disabled" onclick="#">진실</button>
															<span class="badge">${crv.value[1].t}</span> /
															<button class="btn btn-danger btn-xs disabled" onclick="#">거짓</button>
															<span class="badge">${crv.value[1].o}</span>
														</div>
													</div>
													
													<!-- 단점 -->
													<div class="review-c col-xs-12 col-sm-12 col-md-12 col-lg-12" style="padding: 10px;">
														
														<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
															<pre><p class="text-danger"><strong>단점 : </strong></p>${crv.value[2].companyReviewVerifyVO.companyReviewContents}</pre>
														</div>
														
														<div class="review-p-p-c col-xs-12 col-sm-12 col-md-12 col-lg-12" style="padding-bottom: 10px;">
															<button class="btn btn-primary btn-xs disabled"
																onclick="#">진실</button>
															<span class="badge">${crv.value[1].t}</span> /
															<button class="btn btn-danger btn-xs disabled" onclick="#">거짓</button>
															<span class="badge">${crv.value[1].o}</span>
														</div>
														
													</div>
													
													

												</div>

												<!-- 리뷰 -->

												<!-- 작성자 작성일자 평점 순위 -->
												<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"
													style="padding-top: 10px;">
													<button class="btn btn-default btn-sm"
														style="float: right;"
														onclick="location.href='/OffTheRecord/deleteInterestReview.action?companyReviewId=${crv.value[0].companyReviewVerifyVO.companyReviewVO.companyReviewId}'">삭제</button>
												</div>
											</c:forEach>
										</div>
									</c:if>
									<c:if test="${fn:length(crv) == 0}">
									리뷰 없습니다.
								</c:if>
								</div>
								<!-- /.table-responsive -->
							</div>
						</div>

						<c:if test="${flag == 'review'}">
							<div class="tab-pane fade " id="company">
						</c:if>
						<c:if test="${flag == 'company'}">
							<div class="tab-pane fade in active " id="company">
						</c:if>
						<c:if test="${fn:length(flag) == 0}">
							<div class="tab-pane fade " id="company">
						</c:if>
						<div class="user_interest_company">
							<div class="table-responsive">
							
							<c:if test="${fn:length(icList) != 0}">
								<div class="download-xlsx" style="padding: 10px; float: right;">
									<button class="btn btn-default btn-md"
										onclick="location.href='/OffTheRecord/exceldownload.action'">
										엑셀파일로 저장하기 <span class="glyphicon glyphicon-floppy-disk"></span>
									</button>
								</div>
							
								<table class="table table-hover">

									<thead>
										<tr>
											<th>#</th>
											<th>기업 이름</th>
											<th>지역</th>
											<th>산업</th>
											<th>연봉</th>
											<th>평점</th>
											<th>삭제</th>
										</tr>
									</thead>

									<tbody>
										<%-- <c:if test="${fn:length(icList) != 0}"> --%>
										<c:forEach items="${requestScope.icList }" var="icvo"
											varStatus="i">
											<tr>
												<td>${i.count}</td>
												<td>${icvo.companyVo.companyName }</td>
												<td>${icvo.companyVo.regionVo.regionName }</td>
												<td>${icvo.companyVo.industryVo.industryName }</td>
												<td>${icvo.companyVo.companySalary}</td>
												<td>${icvo.companyVo.companyTotalScore }</td>
												<td><button class="btn btn-default btn-xs"
														onclick="location.href='/OffTheRecord/deleteInterestCompany.action?interestCompanyId=${icvo.interestCompanyId}'">삭제</button></td>
											</tr>
										</c:forEach>
										<%--   </c:if>
					           <c:if test="${fn:length(icList) == 0}">
          							<tr><td>관심 기업이 없습니다.</td></tr>
          						</c:if>
          						 --%>
									</tbody>

								</table>
							</c:if>
							<c:if test="${fn:length(icList) == 0}">
							관심 기업이 없습니다.
							</c:if>
							</div>
							<!-- /.table-responsive -->
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--  -->

	</div>
	<!-- row -->
	</div>
	<!-- container -->


	<script
		src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
	<script
		src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
	<script src="../js/bootstrap.min.js"></script>
</body>
</html>